package com.arcbbs.mapper;

import com.arcbbs.entity.LikeRecord;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LikeRecordMapper {
    @Select("select * from like_record where object_id=#{articleId} and user_id=#{userId} and op_type =#{i}")
    LikeRecord getbyobjectiduseridoptype(String articleId, String userId, int i);

    @Delete("delete from like_record  where object_id=#{objId} and user_id=#{userId} and op_type =#{i}")
    void deletebyobjanduserid(String objId, String userId, int i);

    void insert(LikeRecord likeRecord1);

@Select("select  count(*) from like_record where user_id =#{userId}")
    Integer selectcountbyuserId(String userId);
}
